This specification relates generally to key sharing in server farms.
Servers in many server farms store a shared key that is used when processing requests received from client devices. The shared key is a piece of information that specifies the functional output of a cryptographic algorithm. For keys that are used in encryption, a key specifies a particular transformation of plaintext into ciphertext.
For example, the servers may use the shared key to generate and validate information associated with received requests, e.g., to encrypt and decrypt HTTP cookies or session identifiers. Generally, a piece of information generated using a particular key can only be validated using the same particular key. The keys stored on each server may be updated periodically, for example, for security reasons.
In many server farms, the current time between servers is not strictly synchronized. For example, for server farms that include servers in several different physical locations and that use the network time protocol (“NTP”) to synchronize time between their servers, the current time on two different servers in a server farm can vary by a second or more. Because each request can potentially be routed to a different server in the server farm by a load balancing mechanism, this loose time synchronization between servers can cause unwanted authentication failures. For example, a request received from a client device can be routed to a first server in the server farm. The first server can use a first key to, for example, validate a user's identity by encrypting a cookie that is transmitted back to the client device. When the user submits a subsequent request, the request will include the encrypted cookie so that the user's identity does not need to be verified again. This subsequent request may be routed to a different server by a load balancing mechanism. If the second server is using a second, different key to encrypt and decrypt cookies, e.g., because the time difference between the two servers has caused the first server to update its key before the second server, the second server will be unable to decrypt the cookie and validate the user's identity.